<?php
use app\common\services\UrlService;
use app\common\services\ConstantMapService;
use app\common\services\StaticService;
StaticService::includeAppJsStatic('/js/web/account/index.js',app\assets\WebAsset::className());
?>

<?=Yii::$app->view->renderFile("@app/modules/web/views/common/tab_account.php",['current'=>'index'])?>
<div class="row">
	<div class="col-lg-12">
		<form class="form-inline wrap_search">
			<div class="row m-t p-w-m">
                <div class="form-group">
                    <select name="status" class="form-control inline">
                        <option value="<?=ConstantMapService::$status_default?>">请选择状态</option>
                        <?php foreach($status_mapping as $k=>$v):?>
                        <option value="<?=$k?>"><?=$v?></option>
                        <?php endforeach;?>
                    </select>
                </div>

				<div class="form-group">
					<div class="input-group">
						<input type="text" name="mix_kw" placeholder="请输入姓名或者手机号码" class="form-control" value="">
                        <input type="hidden" name="p" value="1">
						<span class="input-group-btn">
                            <button type="button" class="btn btn-primary search">
                                <i class="fa fa-search"></i>搜索
                            </button>
                        </span>
					</div>
				</div>
			</div>
			<hr/>
			<div class="row">
				<div class="col-lg-12">
					<a class="btn btn-w-m btn-outline btn-primary pull-right" href="<?=UrlService::buildWebUrl('/account/set')?>">
						<i class="fa fa-plus"></i>账号
					</a>
				</div>
			</div>
		</form>
        <table class="table table-bordered m-t">
            <thead>
            <tr>
                <th>序号</th>
                <th>姓名</th>
                <th>手机</th>
                <th>邮箱</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <?php foreach($list as $ls){?>
                <tr>
                    <td><?=$ls['uid']?></td>
                    <td><?=$ls['nickname']?></td>
                    <td><?=$ls['mobile']?></td>
                    <td><?=$ls['email']?></td>
                    <td>
                        <a  href="<?=UrlService::buildWebUrl('/account/info',['id'=>$ls['uid'] ])?>">
                            <i class="fa fa-eye fa-lg"></i>
                        </a>
                        <a class="m-l" href="<?=UrlService::buildWebUrl('/account/set',['id'=>$ls['uid'] ])?>">
                            <i class="fa fa-edit fa-lg"></i>
                        </a>
                        <?php if($ls['status']==1):?>
                            <a class="m-l remove" href="javascript:void(0);" data="<?=$ls['uid']?>">
                                <i class="fa fa-trash fa-lg"></i>
                            </a>
                        <?php else:?>
                            <a class="m-l recover" href="javascript:void(0);" data="<?=$ls['uid']?>">
                                <i class="fa fa-undo fa-lg"></i>
                            </a>
                        <?php endif;?>
                                            </td>
                </tr> 
            <?php }?>                   
            </tbody>
        </table>

</div>	</div>
</div>
</div>
</div>


    